/*
 * @Descripttion: 
 * @version: V1.0.0
 * @Author: LeonHe
 * @Date: 2021-10-09 00:01:54
 * @LastEditTime: 2021-10-10 19:58:48
 */

#ifndef __TIME_H_ 
#define __TIME_H_

#include "stm8s.h"

typedef struct
{
    uint32_t lastTime;
    uint32_t timeOutNum;
    uint8_t  isTimeOut;
}stTimeObjDef;

extern uint32_t gTimCountMs;

void timeCoutStart(stTimeObjDef* pObj, uint32_t timeOut);
uint8_t timeIsTimeOut(stTimeObjDef* pObj);
void timeDelayMs(uint32_t ms);
void delayUs(uint16_t us);
void delayMs(uint16_t ms);

#endif

